Index: pkg/common/vclib/datacenter.go
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/pkg/common/vclib/datacenter.go b/pkg/common/vclib/datacenter.go
--- a/pkg/common/vclib/datacenter.go	(revision 8b15f6321185fe406fcd90655cd679ea9e2cdd01)
+++ b/pkg/common/vclib/datacenter.go	(date 1622042067709)
@@ -121,13 +121,38 @@
 		return nil, err
 	}
 	if svm == nil {
-		klog.Errorf("Unable to find VM by UUID. VM UUID: %s", vmUUID)
-		return nil, ErrNoVMFound
+		klog.Infof("failed to get nodeVM for uuid: %s. err: %+v", vmUUID, err)
+		convertedUUID, err := convertUUID(vmUUID)
+		if err != nil {
+			klog.Errorf("convertUUID failed with error: %v", err)
+			return nil, err
+		}
+		svm, err = s.FindByUuid(ctx, dc.Datacenter, convertedUUID, true, nil)
+		if svm == nil {
+			klog.Errorf("Unable to find VM by UUID. VM UUID: %s", convertedUUID)
+			return nil, ErrNoVMFound
+		}
 	}
 	virtualMachine := VirtualMachine{svm.(*object.VirtualMachine), dc}
 	return &virtualMachine, nil
 }

+// convertUUID helps convert UUID to vSphere format
+//input uuid:    6B8C2042-0DD1-D037-156F-435F999D94C1
+//returned uuid: 42208c6b-d10d-37d0-156f-435f999d94c1
+func convertUUID(uuid string) (string, error) {
+	if len(uuid) != 36 {
+		return "", errors.New("uuid length should be 36")
+	}
+	convertedUUID := fmt.Sprintf("%s%s%s%s-%s%s-%s%s-%s-%s",
+		uuid[6:8], uuid[4:6], uuid[2:4], uuid[0:2],
+		uuid[11:13], uuid[9:11],
+		uuid[16:18], uuid[14:16],
+		uuid[19:23],
+		uuid[24:36])
+	return strings.ToLower(convertedUUID), nil
+}
+
 // GetVMByPath gets the VM object from the given vmPath
 // vmPath should be the full path to VM and not just the name
 func (dc *Datacenter) GetVMByPath(ctx context.Context, vmPath string) (*VirtualMachine, error) {
